﻿<div class="site-block welcome rc white-b">
    <div class="site-block-content rc">
        @if (ForumContext.Logined)
        {
                
            
            <div class="site-block dd-popup-menu" id="cpanel_menu">
                <ul class="dd-menu">
                    <li>
                        @Html.Link(ForumContext.GetAbsoluteUrl(ForumUrls.CONTROL_PANEL), ForumContext.GetText(LanguageSection.CPANEL, "HOME_PAGE"))
                    </li>
                    <li>
                        @Html.Link(ForumContext.GetAbsoluteUrl(ForumUrls.PROFILE), ForumContext.GetText(LanguageSection.PROFILE, "PAGE_NAME"))
                    </li>
                    <li>
                        @Html.Link(ForumContext.GetAbsoluteUrl(ForumUrls.CHANGE_EMAIL_PASSWORD), ForumContext.GetText(LanguageSection.CHANGE_EMAIL_PASSWORD, "PAGE_NAME"))
                    </li>
                    <li>
                        @Html.Link(ForumContext.GetAbsoluteUrl(ForumUrls.SIGNATURE), ForumContext.GetText(LanguageSection.SIGNATURE, "PAGE_NAME"))
                    </li>
                    <li>
                        @Html.Link(ForumContext.GetAbsoluteUrl(ForumUrls.AVATAR), ForumContext.GetText(LanguageSection.AVATAR, "PAGE_NAME"))
                    </li>
                    @if (ForumContext.UserInfo.IsAdmin)
                    {
                        <li>
                            @Html.Link(ForumContext.GetAbsoluteUrl(ForumUrls.ADMIN), ForumContext.GetText(LanguageSection.ADMIN, "PAGE_NAME"))
                        </li>
                    }
                </ul>
            </div>

            <div class="site-block dd-popup-menu" id="notify-container">
                <div id="notify-head">
                    <p class="fr">
                        <a href="javascript://" id="notify-prev" class="ui-button">Prev</a> <a href="javascript://" class="ui-button" id="notify-next">Next</a>
                    </p>
                    <h1>
                        Notifications
                    </h1>
                    <br class="empty" />
                </div>
                <ul id="notify-panel">
                </ul>
            </div>
            
            <ul class="cpanel-menu">
                <li class="dropdown {dropdown:{target:'#notify-container',onShow:function(){$.MvcForum.Notification.show()}}}">@*<div class="icon-16 notify">
                        &nbsp;
                    </div>*@
                    <div class="jewelCount rc-3" id="_notifyCount">
                        0</div>
                </li>
                <li class="dropdown {dropdown:{target:'#cpanel_menu'}}">
                    <div class="icon-16 cpanel">
                        &nbsp;</div>
                </li>
            </ul>

            
            @ForumContext.GetText(LanguageSection.GLOBAL, "WELCOME") @Html.Link(ForumContext.GetAbsoluteUrl(ForumUrls.CONTROL_PANEL), ForumContext.UserInfo.UserName, new { @class = "bold" }) 
            <text> ! [ @Html.Link(ForumContext.GetAbsoluteUrl(ForumUrls.LOGOUT), ForumContext.GetText(LanguageSection.CPANEL, "Logout"), new { @class = "confirm", @title = ForumContext.GetText(LanguageSection.CPANEL, "logout_confirm") })
            ] </text>                                                                                                                                                

             
            
                    using (Html.BeginScriptBlock())
                    {
            <script type="text/javascript">

                $(function () {
                    $.MvcForum.Notification.init('@ForumContext.GetAbsoluteUrl(ForumUrls.NOTIFICATION)');
                })

            </script>
                    }

        }
        else
        {
            
            @Html.Raw(string.Format(ForumContext.GetText(LanguageSection.GLOBAL, "WELCOME_GUEST"), ForumContext.GetAbsoluteUrl(ForumUrls.REGISTER), ForumContext.GetAbsoluteUrl(ForumUrls.LOGIN), Server.UrlEncode(Request.RawUrl)))
        }
    </div>
</div>
